<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO, golf.Character, golf.Property"%>
<%
DAO dao = DAO.getInstance();
Character c = null;
int charNo;
Property prop = new Property();
charNo = Integer.parseInt(request.getParameter("charNo").toString());
c = dao.getCharacter(charNo);
prop.setPower( Integer.parseInt(request.getParameter("power").toString()) );
prop.setImpact( Integer.parseInt(request.getParameter("impact").toString()) );
prop.setTechnique( Integer.parseInt(request.getParameter("tech").toString()) );
prop.setStamina( Integer.parseInt(request.getParameter("stamina").toString()) );

if( c.getStat_point() > 0 ){
	System.out.println(prop.getPower()+", "+prop.getImpact()+", "+prop.getTechnique()+", "+prop.getStamina()+", ");
	dao.increaseProperty( charNo, prop );
}
else{
	System.out.println("남은 스탯이 없음.");
}
	

response.sendRedirect("../jsp/manageCharacter.jsp");

%>